#ifndef WEAVEENDINSTRUCTIONVIEW_H
#define WEAVEENDINSTRUCTIONVIEW_H

#include <QWidget>
#include "../ProgramSet/weaveendinstruction.h"

namespace Ui {
class WeaveEndInstructionView;
}

class WeaveEndInstructionView : public QWidget
{
    Q_OBJECT

public:
    explicit WeaveEndInstructionView(int styleId,QWidget *parent = 0);
    ~WeaveEndInstructionView();
public:
    /**
     * @brief getInput             获取界面输入
     */
    void getInput(WeaveEndInstruction &instructionParaOut);

    /**
     * @brief updateView            根据instructionPara更新数据显示在界面
     */
    void updateView();

    /**
     * @brief changeLanguage      界面语言切换
     * @param language
     */
    void changeLanguage(int language);

    void initialDisplayStyle(int styleId);
private:
    void finishEditInstruction(WeaveEndInstruction instructionParaIn,QString &instructionStrOut);

private slots:
        void on_button_editCondition_clicked();

        void on_clearNote_Btn_clicked();

        void on_save_Btn_clicked();


signals:
    /**
     * @brief cleanNoteStrSignal             删除注释信号
     */
    void cleanNoteStrSignal();

    /**
     * @brief finishEditInstruction         指令属性编辑完成
     */
    void finishEditInstructionSignal();

    /**
     * @brief saveInstructionSignal         保存指令
     * @param instructionStr                指令字符串
     */
    void saveInstructionSignal(const QString& instructionStr);
public:
        QString instructionStr;
        WeaveEndInstruction instructionPara;

private:
    Ui::WeaveEndInstructionView *ui;
};

#endif // WEAVEENDINSTRUCTIONVIEW_H
